import { getAction, deleteAction, putAction, postAction, downFilePost, downFile, uploadAction } from '@/api/manage'
import { updataIon } from '@api/xlgc/ComprehensiveBusiness'

/**
 * 案事件管理
 */
//结束任务-命案
const endTask = params => postAction(`/homicide/endTask`,params)
//结束任务-矛盾
const endTask1 = params => postAction(`/xl-contradictions-disputes/endTask`,params)
//结束任务-线路
const endTask2 = params => postAction(`/xl-line-case-events/endTask`,params)
//结束任务-师生
const endTask3 = params => postAction(`/xl-safety-teachers-students/endTask`,params)
//结束任务-重大
const endTask4 = params => postAction(`/xl-major-cases-events/summary`,params)
/*
查看附件
 */
const resultFile = params => getAction(`/xl-event-file/resultFile`,params)
/*
附件上传
 */
const updatas = params => uploadAction(`/sys/common/upload`,params)
//发生地
const getfrom = () => getAction(`/fz-xzqh/getStreet`)
/*
命案防空
 */
//命案防控列表
const getMAlist = params => getAction(`/homicide/selectPage`,params)
//导出表格
const getMAexcel = params =>downFile(`/homicide/exportXls`,params)
//导入表格
const updataMAexcel = params => uploadAction(`/homicide/importExcel`,params)
//案件详情
const getMAdetailed = params => getAction(`/homicide/details`, params)
//事件上报
const getMAshangbao = params => postAction(`/homicide/save`,params)
//导入的模板地址
const getMAMBexcel = () =>getAction(`/homicide/importTemplate`)

/*
矛盾纠纷排查化解
 */
//矛盾纠纷排查化解列表
const getMDlist = params => getAction(`/xl-contradictions-disputes/selectPage`,params)
//导出表格
const getMDexcel = params => downFile(`/xl-contradictions-disputes/exportXls`,params)
//导入表格
const updataMDexcel = params => uploadAction(`/xl-contradictions-disputes/importExcel`,params)
//事件上报
const updataForm = params => postAction(`/xl-contradictions-disputes/save`,params)
//事件详情
const getdataDet = params => getAction(`/xl-contradictions-disputes/detailed/${params}`)
//提交化解信息
const updataHJ = params => postAction(`/xl-contradictions-disputes/saveResolution`,params)
//编辑化解信息
const editResolveInformation = params => postAction(`/xl-contradictions-disputes/editResolveInformation`,params)
//删除化解信息
const postHjdelete = params => postAction(`/xl-contradictions-disputes/deleteResolution/${params}`)
//获取导入的模板
const getMDmoban = () => getAction(`/xl-contradictions-disputes/importTemplate`)
//填写考评意见
const evaluation = params => postAction(`/xl-contradictions-disputes/evaluation`,params)

/*
涉及线、路案(事)件
 */
//列表
const getXLlist = params => getAction(`/xl-line-case-events/selectPage`,params)
//导出表格
const getXLexcel = params => downFile(`/xl-line-case-events/exportXls`,params)
//导入表格
const updataXLexcel = params => uploadAction(`/xl-line-case-events/importExcel`,params)
//事件上报
const updataSave = params => postAction(`/xl-line-case-events/save`,params)
//详情
const getXLdata = params => getAction(`/xl-line-case-events/detailed/${params}`)
//添加案件侦破情况
const updataZP = params => postAction(`/xl-line-case-events/submitSituation`,params)
//删除案件侦破
const deleteZP = params => deleteAction(`/xl-line-case-events/delete/${params}`)
//编辑侦破情况
const updateSituation= parans => postAction(`/xl-line-case-events/updateSituation`,parans)
//获取导入模板
const getXImoban = () => getAction(`/xl-line-case-events/importTemplate`)

/*
涉及师生安全案(事)件
 */
const getSSlist = params => getAction(`/xl-safety-teachers-students/selectPage`,params)
//导出
const getSSexcel = params => downFile(`/xl-safety-teachers-students/exportXls`,params)
//文件导入
const updataSSexcel = params => uploadAction(`/xl-safety-teachers-students/importExcel`,params)
//事件上报
const upDataSSave = params => postAction(`/xl-safety-teachers-students/save`,params)
//事件详情
const getTexiang = params => getAction(`/xl-safety-teachers-students/detailed/${params}`)
//添加案件侦破情况
const updataTe = params => postAction(`/xl-safety-teachers-students/updateSituation`,params)
//获取导入模板
const importTemplate = () => getAction(`/xl-safety-teachers-students/importTemplate`)
/*
重大案事件
 */
//列表
const getZDlist = params => getAction(`/xl-major-cases-events/list`,params)
//详情
const getZDxaing = params => getAction(`/xl-major-cases-events/details/${params}`)
//导入
const updataZD = params =>uploadAction(`/xl-major-cases-events/importExcel`,params)
//导出
const getZDexcel = params => downFile(`/xl-major-cases-events/exportXls`,params)
//上报
const updataZDsb = params => postAction(`/xl-major-cases-events/save`,params)
//事件总结
const updataADzj = params => postAction(`/xl-major-cases-events/summary`,params)
//获取导入模板
const getimportTemplateZ = () => getAction(`/xl-major-cases-events/importTemplate`)
//获取对应案事件详情
const updataTeli = params => getAction(`/workbench/details`,params)

/**
 * 重新发起
 */
//命案重新发起
const updateHomicide = params => postAction(`/homicide/updateHomicide`,params)
//矛盾重新发起
const updateDisputes = params => postAction(`/xl-contradictions-disputes/updateDisputes`,params)
//线路重新发起
const updateLine = params => postAction(`/xl-line-case-events/updateLine`,params)
//师生重新发起
const updateSafety = params => postAction(`/xl-safety-teachers-students/updateSafety`,params)
//重大重新发起
const updateDisputesZ = params => postAction(`/xl-major-cases-events/updateDisputes`,params)

export {
  updateHomicide,
  updateDisputes,
  updateLine,
  updateSafety,
  updateDisputesZ,
  evaluation,
  endTask,
  endTask1,
  endTask2,
  endTask3,
  endTask4,
  getMAMBexcel,
  getimportTemplateZ,

  resultFile,

  updataTeli,
  getfrom,

  getZDlist,
  getZDxaing,
  updataZD,
  getZDexcel,
  updataZDsb,
  updataADzj,

  deleteZP,
  updateSituation,
  getMDmoban,
  updatas,
  getMAlist,
  getMAexcel,
  updataMAexcel,
  getMAdetailed,
  getMAshangbao,
  postHjdelete,
  editResolveInformation,
  getMDlist,
  getMDexcel,
  updataMDexcel,
  updataForm,
  getdataDet,
  updataHJ,

  importTemplate,
  getXImoban,
  getXLlist,
  getXLexcel,
  updataXLexcel,
  updataSave,
  getXLdata,
  updataZP,

  getSSlist,
  getSSexcel,
  updataSSexcel,
  upDataSSave,
  getTexiang,
  updataTe
}
